<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>SSL证书管理系统</title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}"/>
    <script th:src="@{/layui/layui.js}"></script>
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo layui-hide-xs layui-bg-black">管理端</div>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item layui-hide layui-show-sm-inline-block">
                <a href="javascript:;">
                    <img src="//unpkg.com/outeres@0.0.10/img/layui/icon-v2.png" class="layui-nav-img">
                    用户
                </a>
            </li>
        </ul>
    </div>
    <div id="menu" class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree" lay-filter="menu-filter-nav">
                <li class="layui-nav-item layui-this"><a href="javascript:;" view-url="/authConfig/view">服务配置</a></li>
                <li class="layui-nav-item"><a href="javascript:;" view-url="/certInfo/view">证书管理</a></li>
                <li class="layui-nav-item"><a href="javascript:;" view-url="/certDeploy/view">证书部署</a></li>
                <li class="layui-nav-item"><a href="javascript:;" view-url="/certCheck/view">证书监控</a></li>
            </ul>
        </div>
    </div>
    <div class="layui-body">
        <div style="padding: 15px;height: 100%">
            <iframe id="view-iframe" src="/authConfig/view" width="100%" height="100%" style="border: none"></iframe>
        </div>
    </div>
    <div class="layui-footer">
    </div>
</div>
</body>
</html>
<script>
    var $ = layui.$;
    layui.use(function () {
        var element = layui.element;

        //菜单点击事件
        element.on('nav(menu-filter-nav)', function (elem) {
            let viewUrl = elem.attr("view-url");
            $("#view-iframe").attr("src", viewUrl)
        });
    });
</script>
